home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / INFO / CONFIG.ZIP / CONFIG.TXT
Text File  |  1987-01-24  |  35KB  |  648 lines

  1.                  Your CONFIG.SYS and AUTOEXEC.BAT
  2.                             Barry Simon
  3.  
  4. Copyright (c) 1986, by Barry Simon
  5. Written expressly for and posted on Compuserve's IBM Forum.  May 
  6. only be reproduced commercially with the author's permission.  May 
  7. only be distributed with this copyright notice intact.
  8.  
  9. Introduction
  10.  
  11. During the startup of an IBM or IBM compatible computer, the 
  12. operating system looks for two files of user supplied commands 
  13. which allow you to customize your system in various ways.  This 
  14. article will attempt to explain some of the options available to 
  15. you when you make these basic files.  While I have written it for 
  16. the relative novice, I hope it may provide some useful new tricks 
  17. even to the more experienced user.
  18.  
  19. These two files whose names must be CONFIG.SYS and AUTOEXEC.BAT 
  20. should reside in the root directory of your boot diskette or of 
  21. your hard disk if you have a bootable hard disk (i.e. if you can 
  22. start your system from your hard disk without placing a diskette 
  23. in drive A).  Actually, there is a method for placing the 
  24. AUTOEXEC.BAT file in a subdirectory but despite the fact that I 
  25. tend to be fanatical about keeping my root directory lean, I don't 
  26. recommend using this option.
  27.  
  28. When you turn on your computer, the CPU is setup to begin a 
  29. program in the ROM (read only memory) that all IBM compatible 
  30. machines have.  This ROM is distinct from and in addition to the 
  31. working RAM (random access memory).  When you are sold a machine 
  32. with 256K of memory, that figure refers to the RAM.  There is an 
  33. additional 16K-32K of ROM.  RAM is cleared whenever you turn off 
  34. your machine or reboot while the ROM is permanently burned in and 
  35. should not change.
  36.  
  37.  
  38. Booting Up
  39.  
  40. The program that is automatically run from ROM begins with a brief 
  41. test (POST="power on self test") of various components of your 
  42. computer.  If you have an XT or AT, the most noticeable part is the 
  43. memory(RAM) test accompanied by counting up the memory on your 
  44. screen as the test progresses.  This test is skipped when you do a 
  45. warm reboot by hitting Ctrl-Alt-Del.  You may also notice your 
  46. drives and printer "burping" as they get tested. 
  47.  
  48. After this test, the machine searches for various "ROM extensions" 
  49. that is additional ROM that can come with a hard disk or EGA card 
  50. for example.  The program then searches first drive A and then a 
  51. hard disk if you have a bootable hard disk for a diskette or disk 
  52. program to transfer control to.  It transfers control to the very 
  53. first sector on the disk which is called the boot sector.  When 
  54. you format a diskette, a little program is placed in the boot 
  55. sector which will display the message "non system disk, replace 
  56. and hit any key".  When you transfer the operating system to the 
  57. disk with the SYS command or via FORMAT/S, this boot sector 
  58. program is changed to transfer control to a program which must be 
  59. in the position immediately following the boot sector.
  60.  
  61. If the disk has the system on it, control is transferred 
  62. successively to two hidden files which load the BIOS ("basic 
  63. input/output system" part of which is in ROM) and the DOS ("Disk 
  64. operating system").  When most users think of DOS they think of 
  65. the familiar prompt and copy,.... commands.  These parts of the 
  66. DOS are only loaded later; the part in the hidden file involves 
  67. services provided by DOS to programmers rather than directly to 
  68. users.  The two hidden files are called "IBMBIOS.COM" and 
  69. "IBMDOS.COM" in PC-DOS and may have different names on other 
  70. computers although surprisingly, the names persist even on some 
  71. non-IBM brands!
  72.  
  73. Parenthetically, I want to note that there isn't really much 
  74. hidden about hidden files.  As you may know, the DIRectory you are 
  75. used to display gets its information from a special file also 
  76. called the directory.  This file is essentially a little database 
  77. with information about each file including the filename, 
  78. extension, date and time of creation.  One byte in the record for 
  79. each file is called the attribute byte and contains eight 
  80. "switches" to keep track of things like whether the file is a 
  81. volume label, read only, etc.  One of these switches is whether 
  82. the file is "hidden".  To anyone with any programming experience 
  83. or with any of a large number of public domain or commercial 
  84. programs, these files are not in any sense hidden.  The basic DOS 
  85. services like DIR and COPY are specially set up to ignore hidden 
  86. files and that is the only sense in which these files are hidden.  
  87. The two system files are hidden because their location is critical 
  88. for a successful boot-up and they are less likely to be moved by 
  89. accident if they are hidden. 
  90.  
  91. After the second hidden file is mainly loaded, it looks for a 
  92. special file called "CONFIG.SYS" and processes the commands in it.  
  93. Then control is passed to the third file in the operating system, 
  94. COMMAND.COM.  As the final step in booting up, COMMAND.COM looks 
  95. for a file names AUTOEXEC.BAT and if found it loads it and runs 
  96. it.  If not found, COMMAND.COM exits with the DATE and TIME 
  97. commands. 
  98.  
  99. Except for its special status as a bootup file, the AUTOEXEC.BAT 
  100. file is an ordinary BATch file with the usual rules of syntax.  
  101. The CONFIG.SYS file has a special syntax with a limited number of 
  102. allowed commands.  Both must be pure ASCII files, that is without 
  103. any special formatting codes that some word processors add.  Many 
  104. word processors which have special codes have a "non-document" 
  105. mode for preparing ASCII files.  These files have separate lines 
  106. which must be ended with carriage return/line feed pairs.  If you 
  107. have any doubts about whether the file is "pure ASCII" you can use 
  108. the TYPE command to display it on the screen and see if it just 
  109. has ordinary letters and numbers.
  110.  
  111.  
  112. What goes in your root directory
  113.  
  114. When a subdirectory fills up, it adds another cluster of disk 
  115. space to increase its size but the size of the root directory is 
  116. fixed at the time the diskette or disk is formatted.  It is not 
  117. merely because of the size restriction  that I recommend that you 
  118. keep your root directory slight.  Since the files in the root are 
  119. likely to be of diverse type, it will be difficult to keep track 
  120. of things if you put too much there.  I mainly put subdirectories 
  121. there and mainly subdirectories which have no files but only 
  122. subsubdirectories.  For example, I have a words subdirectory with 
  123. my word processor, outliner, thesaurus, etc in subsubdirectories.  
  124. Generally, there are only three files that I recommend go into the 
  125. root: COMMAND.COM, CONFIG.SYS and AUTOEXEC.BAT.  As I mentioned, 
  126. one can put AUTOEXEC.BAT elsewhere and even COMMAND.COM but I feel 
  127. that is carrying things too far.  In fact, I even have a 
  128. startup.bat file of the type I'll describe there but the point is 
  129. to keep that directory thin and to complain bitterly about 
  130. software so inconsiderate that it forces you to place it in the 
  131. root directory.  My point in mentioning this here is that I'm 
  132. about to discuss device drivers which many people put in the root 
  133. directory.  If you like to be organized, I recommend you make a 
  134. directory for device drivers (mine is called \bin\devices).  
  135. Another option is to put the drivers in different directories with 
  136. each driver in with related files so, for example, the drivers 
  137. that come with DOS are kept in the same directory as the other DOS 
  138. programs or the mouse driver is with the other mouse software.
  139.  
  140.  
  141. Device drivers
  142.  
  143. There are a group of programs which are made permanently resident 
  144. and which are loaded as part of the CONFIG.SYS.  Virtually any 
  145. resident program can be produced in this format but certain ones 
  146. must be of this form.  Typically, console drivers and any program 
  147. which controls "a device" must be loaded now.  Most virtual disks 
  148. and print spoolers also are loaded as device drivers.  While 
  149. device drivers are programs, they need not have the extension 
  150. "com" or "exe".  In fact, so far as I can tell their extension can 
  151. be anything that you wish.  Nevertheless virtually all 
  152. commercially available device drivers have the extension "sys".  
  153. Some drivers are available with the extension "dev".  The syntax 
  154. for loading a device driver in your CONFIG.SYS is
  155.   device=<path><name><parameters>
  156. so if you have a device foo.sys in the directory \bin\devices of 
  157. drive C: and it will take a numeric parameter to set the size of 
  158. some buffer, you might load it with
  159.   device=C:\bin\devices\foo.sys 128
  160. Note that it is essential to include the extension "sys" or else 
  161. you will get an error message "bad or missing foo".  The drive 
  162. letter C: is not required but it can't hurt and I know of one 
  163. person who claimed the device driver on her machine couldn't be 
  164. found without it.  The question of which parameters a given device 
  165. driver allows or whether it allows any at all depends on the 
  166. driver and should be dealt with in the documentation for the 
  167. program in question.  For the drivers ANSI.SYS and VDISK.SYS which 
  168. come with DOS, I note that the former takes no parameters while 
  169. the later takes parameters explained in the DOS manual.  DOS 3.2 
  170. comes with a third driver called DRIVER.SYS while some versions of 
  171. MSDOS 3.2 comes with an alternate ram disk called RAMDRIVE.SYS.  
  172. Both take parameters.
  173.  
  174.  
  175. Examples of Device Drivers: the default drivers
  176.  
  177. I will not attempt to describe all available device drivers since 
  178. there are so many.  For example, Chris Dunford, one of the sysops 
  179. of Compuserve has written public domain programs which installs 
  180. "devices" to control screen blanking (BURNDEV) and another 
  181. allowing you to send control sequences easily to your speaker 
  182. (SPKR).  These represent examples where a real "device" is 
  183. installed.  A device is a virtual file which can typically be 
  184. written too and read from.  The most common example is "con" which 
  185. you typically read from when you issue the command "copy con 
  186. filename".  Devices can only be installed via the CONFIG.SYS.  
  187. Despite the name, the device command can load other programs which 
  188. do not control devices and physical "devices" may not be devices 
  189. in the sense of setting up a virtual file.  A mouse is a good 
  190. example of something which is not a device in this technical 
  191. sense. 
  192.  
  193. The hidden file IBMDOS sets up several devices even if you have no 
  194. CONFIG.SYS: con, prn, aux, lpt1, lpt2, lpt3, com1, com2.  Con, 
  195. short for console is a combined keyboard/monitor device, prn for 
  196. printer is by default a name for lpt1 and aux a name for com1.  
  197. The DOS mode command allows reassignment of these devices.  LPTn 
  198. and COMn are names for the parallel and serial ports on the 
  199. computer.  These device names are assigned even if you don't have 
  200. the full complement of ports.
  201.  
  202.  
  203. Examples of Device Drivers:Console Drivers
  204.  
  205. The most common device driver to install is a console driver which 
  206. replaces the default console driver.  Some of these replacements 
  207. attempt to address the notoriously slow display speed of the 
  208. monitors and/or the annoying flicker on the color graphics 
  209. display.  In addition some of the escape sequences of the 1977 
  210. console standard of the American National Standards Institute 
  211. (ANSI) are implemented.  These sequences include ways of 
  212. controlling colors, cursor position and some DOS level keyboard 
  213. macros.  (They are described in my article ANSI.ART).  One 
  214. console driver of this type called ANSI.SYS is supplied with DOS 
  215. and takes about 2K of resident memory.  It does not address the 
  216. speed of display issue but it does implement several ANSI escape 
  217. sequences.  There are numerous programs which assume the ANSI.SYS 
  218. is installed to operate properly (as well as a few that don't work 
  219. properly if ANSI.SYS is installed!) so it is wise to install ANSI 
  220. or an equivalent driver even if you do not want to use its 
  221. features yourself.  Actually, it is not hard to use the driver at 
  222. the DOS level to set colors, set up a fancy prompt or redefine 
  223. keys.
  224.  
  225. There are several alternatives available to ANSI.SYS which you 
  226. might want to consider.  NANSI.SYS is a public domain program  
  227. which speeds up scrolling (when combined with RAW mode by a factor 
  228. of about 2) and provides some additional ANSI escape commands at a 
  229. cost of only 3K of RAM.  FANSI CONSOLE and TALL SCREEN are two 
  230. commercial programs (listing for $75 and $49 respectively) taking 
  231. much more memory (around 60K with a reasonable amount of screen 
  232. save memory) providing many more services: faster scrolling (FANSI 
  233. only), screen blanking (FANSI only), DOS command line editing and 
  234. recall (TALL SCREEN ONLY), screen memory and keyboard 
  235. enhancements as well as additional features.  While it is most 
  236. natural to control scrolling by a device driver, there is at least 
  237. one commercial com program which takes over the console by a 
  238. different method and speeds up scrolling my a factor of six or 
  239. more (FLICKER FREE).  I am quite happy with FANSI but I have 
  240. friends whose computer taste I trust using both NANSI and TALL 
  241. SCREEN so the choice is not clear.  And FLICKER FREE is an 
  242. intriguing program whose second release (which will support the 
  243. EGA) I eagerly await.
  244.  
  245.  
  246. Examples of Device Drivers:Other drivers
  247.  
  248. If you have a Lotus/Intel/Microsoft EMS board or AST EEMS board, 
  249. you will need to load a device driver to access this extended 
  250. memory.  Often the command will require various parameters to 
  251. specify the amount of memory being set aside and various items 
  252. like the region of conventional memory used for swapping and the 
  253. port number to use.  Be warned if you are setting up a CONFIG.SYS 
  254. file for the first time that you may already have a CONFIG.SYS 
  255. file which was made for you when you installed the EMS software 
  256. that came with your board.  Since this likely has the correct 
  257. parameters, you should make your own CONFIG.SYS file by starting 
  258. with this one and continuing from there.  It is possible that you 
  259. will need to load the EMS driver before anything else.   I can 
  260. report that if I try to load FANSI-CONSOLE on my AT before the EMS 
  261. driver that Intel supplies with my Above Board AT, the EMS driver 
  262. refuses to load and gives me the error message that my machine is 
  263. "not a close enough AT compatible"!  Also be warned that while 
  264. there is an EMS "standard", this refers to the way EMS works once 
  265. the driver that comes with your board is installed.  More likely 
  266. than not, drivers from different companies are incompatible and if 
  267. you need a second EMS board, it will have to come from the company 
  268. that supplied your first (this warning does not apply to extended 
  269. memory on the AT but only to expanded EMS memory).
  270.  
  271. Some older hard disks are not self booting and require a device 
  272. driver loaded in your CONFIG.SYS but that is not so common any 
  273. more.  DOS 3.2 has a program called DRIVER.SYS which is a device 
  274. driver to initialize external 3.5 inch drives if you have one on 
  275. an XT or AT.  By far the most common drive device driver is to 
  276. operate a RAM disk, that is a segment of RAM set aside as a fast 
  277. virtual disk.  There are com files loaded after the CONFIG.SYS 
  278. which set up such drives but generally it is more sensible to use 
  279. a device driver for this.  DOS 3.x comes with a program VDISK.SYS 
  280. to set up a RAM disk.  This disk can operate in conventional or AT 
  281. extended memory.  It will not set up a RAM disk in EMS memory but 
  282. most EMS boards come with device drivers to set up RAM disks in 
  283. EMS.  In addition Microsoft WINDOWS comes with a RAM disk device 
  284. driver (which can be run independently of WINDOWS) and which can 
  285. be set up in conventional, AT extended or EMS memory.  Given 
  286. Microsoft's experience and the care they have lavished on WINDOWS, 
  287. I'd recommend using the WINDOWS RAM disk driver if you have it in 
  288. preference to alternatives and, in particular to VDISK which also 
  289. comes from Microsoft.  However, if you are loading other programs 
  290. that use AT extended memory, you may want to stick with VDISK 
  291. because the specification that IBM uses to access AT extended 
  292. memory is published while that of Microsoft is not and so other 
  293. programs may clobber the Window's RAM DISK driver.  If you want to 
  294. set up more than one RAM disk, you can include more than one line 
  295. loading a RAM disk driver in your CONFIG.SYS file.  You can 
  296. normally load the same driver twice or use different driver if you 
  297. prefer.  Be warned that there is typically a few K overhead in 
  298. conventional memory to load a RAM disk and you will pay this 
  299. overhead more than once if you load more than one RAM disk. 
  300.  
  301. Print spoolers set aside some memory to receive printer output and 
  302. then send that output to your printer as a background process.  I 
  303. regard them as a tremendous productivity tool.  While there exist 
  304. print spoolers loading as com files, many are loaded as device 
  305. drivers.
  306.  
  307. The Microsoft Mouse requires software to install it so your system 
  308. will recognize the mouse.  The mouse comes with two versions of 
  309. this software: MOUSE.SYS which is loaded as a device driver in 
  310. your CONFIG.SYS and MOUSE.COM which is loaded later, typically in 
  311. your AUTOEXEC.BAT.  I do not believe there is any particular 
  312. reason to prefer one over the other.  Microsoft recommends using 
  313. the device driver on all systems but the 3270 machines.  If you 
  314. are using Software Carousel, you'll want to use the com file in 
  315. various partitions rather than the device driver.
  316.  
  317. As you may know you can place remarks in your BATch files and in 
  318. particular in your AUTOEXEC.BAT.  This is useful if you want to 
  319. temporarily run your system without some resident program that is 
  320. usually loaded in your AUTOEXEC.BAT file.  You need only "remark 
  321. it out", i.e. add the phrase "REM " at the beginning of the line 
  322. including it.  Technically, remarks are not allowed in CONFIG.SYS 
  323. files.  If you insert the word "REM" at the start of a line in 
  324. your CONFIG.SYS file you will get the message
  325.    Unrecognized command in CONFIG.SYS
  326. However, since the rest of the line is not acted on, this 
  327. procedure will have the desired effect of "commenting out" the 
  328. line in question so you should not hesitate to use it.
  329.  
  330. ECHO also doesn't work in CONFIG.SYS so there is no direct way of 
  331. placing messages on the screen during the loading of the 
  332. CONFIG.SYS  However, there is a public domain program called 
  333. COMMENT.SYS which allows you to echo comments to the screen via
  334.    device=path\comment.sys <message>
  335. There is no stay resident part of comment.sys so you don't waste 
  336. memory, only time, by using it.  If you are a color freak, you can 
  337. first load an ANSI compatible console driver and then use 
  338. COMMENT.SYS to send color setting escape sequences to the screen 
  339. and so see most of your bootup in living color!
  340.  
  341.  
  342. The FILES command
  343.  
  344. DOS is a prisoner of its past.  Original IBM PC's came with only 
  345. 16K of memory (!) so when DOS boots up it sets aside memory for 
  346. various purposes in an incredibly frugal manner.  The defaults 
  347. for three regions of memory set aside for file handles, disk 
  348. buffers and environment are woefully inadequate.  If you know what 
  349. you are doing, it is easy to change these defaults but it's 
  350. unfortunate that the novice gets stuck with these small values.  
  351. In any event, FILES and BUFFER commands are among the most 
  352. important for you to include in your CONFIG.SYS.  When DOS opens a 
  353. file, it keeps certain information in memory to be able to quickly 
  354. access the file.  This information is called a file handle.  
  355. During bootup, memory is put aside for these file handles so a 
  356. limit is placed on the number of files that can be open at one 
  357. time.  The default is eight which may seem adequate since programs 
  358. normally close files when they are done allowing the file handles 
  359. to be reused.  However, eight is often not adequate.  DOS uses 
  360. four of the handles itself for "files" like con and prn.  Thus 
  361. there are four available for your programs.  Some resident 
  362. programs leave files open and even the ones that don't, may need 
  363. to open a file for an initial access at the same time that an 
  364. application program have several files open.  Database programs 
  365. often have separate index and data files and typically may want to 
  366. have more than four open files.  If DOS is asked to open a file 
  367. and a handle is not available, DOS issues an error message and the 
  368. running program may even abort.  I strongly recommend that you 
  369. place the line
  370.    FILES=20
  371. in your CONFIG.SYS file.  Indeed since the cost of increasing 
  372. files is less than 40 bytes per handle, you could even use a 
  373. number larger than 20.  For most purposes 20 should suffice but 
  374. ever since it wasn't enough for me in a rather specialized 
  375. situation, I've taken files=30 myself.
  376.  
  377.  
  378. BUFFERS
  379.  
  380. You may have heard of disk caching.  As you've noticed, diskette 
  381. access is very slow and even a hard disk has access times 100 fold 
  382. grater than RAM access times.  Disk caching sets aside some RAM to 
  383. keep a copy of the most recently accessed disk information so, for 
  384. example, if a database is continually accessing a disk, the first 
  385. time the disk is really read but the next time the copy in cache 
  386. memory will be read instead.  This is not the place to discuss the 
  387. pros and cons of commercial disk caching software but you should 
  388. know that DOS comes with some free rudimentary disk caching 
  389. included.  It keeps N buffers of 512 bytes each with the copies of 
  390. the last N disk sectors accessed.  By default N is only two (three 
  391. on the AT).  You should certainly make this number larger by 
  392. including the line 
  393.    BUFFERS=N
  394. in your CONFIG.SYS where recommended values of N are between 10 
  395. and 25.
  396.  
  397. Let me tell you an anecdote to show how dramatic a difference this 
  398. number can make.  The first time that I ran my tape backup drive 
  399. to backup my 30 meg hard disk, I was bitterly disappointed.  
  400. Despite what I'd been told by the salesman, it took over 45 
  401. minutes!  The next day, when I thought about it and tried again, 
  402. it took only 8 minutes!  What had happened?  The first time I had 
  403. been nervous about the effect my many resident programs might have 
  404. so I put an original write protected DOS disk in drive A and 
  405. rebooted before running the backup software.  This disk had no 
  406. CONFIG.SYS so I was running with the default three buffers.  The 
  407. next day, I used my regular hard disk boot with buffers=20 and 
  408. that made the difference.  I have done some time tests comparing 
  409. something as simple as copying a directory from a hard disk to a 
  410. floppy and I've found that using extra buffers can decrease times 
  411. by 30 or 40 percent.  So USE YOUR FREE DISK CACHING.
  412.  
  413. The issue of precisely how many buffers to take is not an easy 
  414. one.  Increasing the number of files handles has little effect on 
  415. memory or efficiency so you can freely take files=99 if the mood 
  416. strikes you.  This is not so with buffers.  Each buffer takes .5K 
  417. of RAM so buffers add up.  Moreover at some point it will take DOS 
  418. longer to check through all its buffers looking to see if a file 
  419. is there than it would take it to access it directly.  I've seen 
  420. the number 25 given as a dividing line but I would like to do some 
  421. tests to check this out.  I can only say that I've settled on 
  422. buffers=20 myself and that with a floppy based system, you should 
  423. take a higher figure than you might with a hard disk.
  424.  
  425.  
  426. Increasing your environment
  427.  
  428. DOS sets up a special section of memory called the environment 
  429. which has a default size of 160 bytes.  This area must hold your 
  430. path, your prompt, the place that COMMAND.COM can be found and 
  431. various other strings.  Programs can communicate with you by 
  432. asking you to place information in the environment with the SET 
  433. command.  In addition you can keep global variables in the 
  434. environment to pass between BATch files.  If you attempt to place 
  435. more there than it has room for you'll get a message "Out of 
  436. environment space".  With DOS 3.1 and later there is a CONFIG.SYS 
  437. command allowing you to increase the amount of space reserved for 
  438. your environment.  There are known patches for earlier versions 
  439. DOS which are listed for example in my article on ANSI.SYS.  The 
  440. procedure is documented in DOS 3.2 and so presumably it will be 
  441. a permanent feature of DOS.  It is undocumented in DOS 3.1.  The 
  442. syntax is 
  443.    shell=C:\command.com /P /E:nnn
  444. where n is the number of bytes you want to set aside for the 
  445. environment.  For DOS 3.1 nnn represents the number of 16 byte 
  446. paragraphs you want to set aside.  So for a 512 byte environment 
  447. take nnn=32 in DOS 3.1 and 512 in DOS 3.2.  Obviously with a 
  448. floppy based system, replace C: by A:
  449.  
  450. How much space do you need for your environment?  That depends on 
  451. your path, applications and how fancy a prompt you make.  My 
  452. advice is to do nothing until you have a problem at which point 
  453. you should remember that there is something that you can do.
  454.  
  455. For more advanced users, I note that the environment is not as 
  456. benign as you might think.  I know of several programs which 
  457. crashed if there was too much in the environment (most of the ones 
  458. I know about have been fixed) and one that crashed if the PATH was 
  459. the last thing set in the environment.  I have occasionally been 
  460. baffled at what could be causing a conflict only to discover the 
  461. culprit was the environment.
  462.  
  463.  
  464. Miscellaneous CONFIG.SYS commands
  465.  
  466. There are some other commands that can go in your CONFIG.SYS:
  467.  
  468.   -You can turn BREAK ON that is have the operating system check 
  469.   for control C more often than just during disk I/O.  This slows 
  470.   down certain processing but gives you more safety from certain 
  471.   kinds of dead ends.  The syntax is a line saying
  472.       BREAK=ON
  473.   Unlike any other CONFIG.SYS command, this one can also be issued 
  474.   from the DOS command line or in your AUTOEXEC.BAT file.
  475.   -In addition to file handles, DOS has something call file 
  476.   control blocks which in DOS 3.x can be changed by an FCBS 
  477.   command.  These are needed only if you have a LAN (local area 
  478.   network) and the parameters to take should be discussed by your 
  479.   LAN software. 
  480.   -DOS 3.2 has a STACK command.  From what I've read this is a 
  481.   real cludge and the manual seems to suggest that it was added at 
  482.   the last minute to solve a problem connected with a new way that 
  483.   DOS3.2 treats the stack.  In any event, if you use DOS 3.2 and 
  484.   seem to have unexplained crashes, try adding 
  485.     STACK=20
  486.   to your CONFIG.SYS.
  487.   -DOS 3.1 and later allows you to use the SUBST command to assign 
  488.   drive letters to directories.  In addition, with several RAM 
  489.   disks you may want to assign a letter beyond the default last 
  490.   drive of E.  DOS 3.x allows you to add a command
  491.     LAST DRIVE =  ?
  492.   where ? is a letter and then you can assign any drive up to and 
  493.   including that letter.  Even a last drive=z only takes about 1K 
  494.   of RAM.
  495.   -There is a COUNTRY command to control things like the time 
  496.   format.  The default is USA.
  497.  
  498. One final remark about your CONFIG.SYS.  The order of the commands 
  499. is irrelevant except to the extent that certain device drivers 
  500. like to be loaded before others (and if you are loading two RAM 
  501. disks of different sizes you may care which is assigned which 
  502. letter).  As with most DOS commands the syntax is not case 
  503. sensitive.
  504.  
  505. As a review of what a CONFIG.SYS can contain, let me list the 
  506. CONFIG.SYS from one of my machines which is running DOS 3.2:
  507.    break=on
  508.    buffers=20
  509.    device=C:\bin\intel\emm.sys M3 I5 D
  510.    device=C:\bin\devices\fconbeta.dev /C=1/S=2000/H=0/V=0/R=200/L=1/W=1
  511.    device=C:\bin\devices\ramdrive.sys 1024 512 128 /A
  512.    device=C:\bin\devices\ramdrive.sys 1300 512 64 /E
  513.    device=C:\bin\devices\atqlpt1.sys 1644,1,3
  514.    device=C:\bin\devices\mouse.sys
  515.    files=30
  516.    lastdrive=z
  517.    shell=C:\command.com /P /E:512
  518.  
  519.  
  520.  
  521. What should your AUTOEXEC.BAT contain?
  522.  
  523. Most of my AUTOEXEC.BAT file loads my own particular blend of 
  524. resident programs.  This is not the place for me to advise you on 
  525. what resident programs you might want to put into your system but 
  526. I would like to make some comments about DOS and general aspects 
  527. of what goes into your AUTOEXEC.BAT file.
  528.  
  529. First, if you have very many resident programs, they may have 
  530. conflicts and you must be prepared to permute the order of 
  531. loading which often cures some or all of the conflicts.  For 
  532. technical reasons I won't go into here it really does pay to 
  533. listen to SIDEKICK's demand to be loaded last although you need 
  534. not take all the other Borland program demands quite so seriously.
  535.  
  536. In addition to loading a stable of resident programs your 
  537. AUTOEXEC.BAT can contain some of the following:
  538.    -a VERIFY ON command.  This slows down copying because DOS 
  539.    checks that the copy at least has consistent CRCs; this is not 
  540.    the same as comparing after copying but it is a fairly good check.  
  541.    Only several compensating errors could pass this test after an 
  542.    incorrect copy.
  543.    -set a PROMPT.  At a minimum use 
  544.       prompt=$p$g
  545.    Mine uses ANSI.SYS to set colors and place the path and date on 
  546.    the bottom line of my screen
  547.    -set a PATH.  If possible, keep your path short since every 
  548.    time you type in a bad command, DOS will have to read every 
  549.    directory in the path before responding "Bad command or 
  550.    filename".  Also try to list the path in the order of how many 
  551.    times you expect to access a given directory.  That is place 
  552.    the directories you call most often early in your path.  If 
  553.    you have a RAM disk, place its directories first in the path.  
  554.    If you have a relatively large RAM disk, think about copying 
  555.    your BATch file directory and the programs you call often to 
  556.    that RAM disk and place that RAM disk first in your path.
  557.    -If you have a large RAM disk, consider copying COMMAND.COM to 
  558.    it and placing the command
  559.      SET comspec=D:\command.com
  560.    in your AUTOEXEC.BAT (assuming D: is your RAM disk).  Even 
  561.    without a large RAM disk, it is worthwhile to do this on a 
  562.    floppy based system.  What the command does is tell DOS to look 
  563.    there when it needs to reload COMMAND.COM (large programs will 
  564.    overwrite a part of COMMAND.COM and when they exit, DOS will 
  565.    try to reload COMMAND.COM.  With the above command, you'll no 
  566.    longer get "Place a disk with command.com in drive A: and hit 
  567.    any key to continue".)
  568.    -It really is important to put the proper date and time in your 
  569.    system.  Be sure to include the DATE and TIME commands or else 
  570.    be sure to get a clock and place the appropriate commands 
  571.    setting the system time from the clock into your AUTOEXEC.BAT 
  572.    file.
  573.    -if you want to keep track of how often you boot, keep a record 
  574.    in a convenient directory.  Make a file called junk consisting 
  575.    only of a carriage return line feed and include the lines
  576.      date >>directory\logon <junk
  577.      time >>directory\logon <junk
  578.    You will then get the lines
  579.      Current date is Wed  7-23-1986
  580.      Enter new date (mm-dd-yy): 
  581.      Current time is 16:29:22.70
  582.      Enter new time:
  583.    for each time you bootup.  With CED, EBL or some other programs 
  584.    you can get this record in a more elegant fashion without the 
  585.    "Enter new ..." lines.
  586.  
  587.  
  588. Speed and Memory tips
  589.  
  590. Some final remarks about tricks to minimize memory usage and speedup 
  591. your bootup procedure.  When DOS loads any program it saves a 
  592. copy of the current environment in memory, one copy for each 
  593. program.  It doesn't force the copy to be as large as the empty 
  594. space that you've set aside via a shell command but only to keep 
  595. in full the present value of all environmental variables.  Thus 
  596. you can save memory by keeping the environment small while your 
  597. AUTOEXEC.BAT file is loading your resident programs.  Two 
  598. variables  are always present: path and comspec.  I start my 
  599. AUTOEXEC.BAT file with a line 
  600.   Path=A
  601. This is incorrect syntax and gets ignored when the path is needed.  
  602. I have to be sure to put down full path names of all the programs 
  603. that I load but that speeds processing any ways.  I reset the path 
  604. and set the prompt at the end of my AUTOEXEC.BAT after I've loaded 
  605. my resident programs.  Given my fancy prompt, I save almost 200 
  606. bytes per resident program  from what would happen if I set my 
  607. path and prompt at the beginning of my AUTOEXEC.BAT.  In total I 
  608. save several K of RAM: not a lot but every little byte helps.
  609.  
  610. BATch files are read by DOS a line at a time so BATch files really 
  611. do get processed much faster from a RAM disk than from a floppy.  
  612. There is a smaller difference between a hard disk and a RAM disk. 
  613. If you have a RAM disk and a floppy based system, it is well worth 
  614. your while to place what would have been your AUTOEXEC.BAT in a 
  615. file called startup.bat and have your AUTOEXEC.BAT read:
  616.    copy startup.bat C:
  617.    C:startup.bat
  618. assuming your RAM disk is C:.  To conserve space, you can have the 
  619. last line in startup.bat say
  620.    erase C:startup.bat
  621. You'll get a "batch file missing" error message but other than 
  622. that the method will work perfectly.  This procedure can also be 
  623. used on a hard disk.  The savings when I did it on my hard disk 
  624. was two seconds out of about 65 so you may not feel it is worth 
  625. your while.
  626.  
  627. You can slightly speed up processing of BATch files especially 
  628. from floppies by using the FOR...IN...DO command to combine 
  629. several commands in one line.  For example, if you want to copy 
  630. \bin\batfiles, \bin\dump and \bin\opsys to your RAM disk you might 
  631. try
  632.   for %%a in (\bin\batfiles \bin\dump \bin\opsys) do copy %a C:\ >nul
  633. if C: is your RAM disk.  This can actually cut about 10% off a 
  634. long AUTOEXEC.BAT file.  Several warnings are in order.  First, 
  635. FOR...IN...DO parse the list at spaces so you can't combine 
  636. commands which have parameters in this way.  Secondly, I strongly 
  637. recommend against using this device to load resident programs 
  638. particularly if you plan to use Kokkenen's MARK/RELEASE package.
  639.  
  640.  
  641. Summary
  642.  
  643. By using your CONFIG.SYS and AUTOEXEC.BAT files you can 
  644. personalize many aspects of your PC.
  645.  
  646. e uses ANSI.SYS to set colors and place the path and date on 
  647.    the bottom line of my screen
  648.    -set a PATH.